<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <div id="app">
        <button @click="increase">increase</button>
        <button @click="stop">stop</button>
        <div>count: {{count}}</div>
    </div>
</head>
<body>
    <script type="module">
        import {createApp, watchEffect, ref} from './node_modules/vue/dist/vue.esm-browser.js'
        createApp({
            setup() {
                let count = ref(0)
                let stop = watchEffect(()=>{
                    console.log(count.value)
                })
                return {
                    count,
                    stop,
                    increase:()=>{
                        count.value += 1;
                    }
                }
            }
        }).mount("#app")
    </script>
</body>
</html>